<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('资产负债表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                              <li>
								<label>核算年度：</label>
								<select name="params[nd]" id="nd">
									<option th:each="nd : ${ndlist}" th:text="${nd}" th:value="${nd}"> th:selected="${nd==year}"> </option>
								</select>
							</li>
                            <li >
								<label>核算期间： </label><select name="params[yf]" id="yf">
								    <option th:each="yf : ${yflist}" th:text="${yf}" th:value="${yf}" th:selected="${yf==term}"></option>
								</select>
							</li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
               
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:zcfzb:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/zcfzb";

        $(function() {
            var options = {
                url: prefix + "/list",
                exportUrl: prefix + "/export",
                modalName: "资产负债表",
                pagination: false,
                columns: [	
                	
                	[   {
    					title : '资产负债表',
    					align : 'center',
    					colspan : 8
    					}
    				],
	                [{
	                    field: 'name1',
	                    title: '资产部类',
	                    align : 'left'
	                },{
	                    field: 'num1',
	                    title: '行次',
	                    align : 'center'
	                }, 
	                {
	                    field: 'ncye1',
	                    title: '年初数',
	                    align : 'right'
	                },
	                {
	                    field: 'qmye1',
	                    title: '期末数',
	                    align : 'right'
	                },
	                {
	                    field: 'name2',
	                    title: '负债部类',
	                    align : 'left'
	                    
	                },{
	                    field: 'num2',
	                    title: '行次',
	                    align : 'center'
	                },{
	                    field: 'ncye2',
	                    title: '年初数',
	                    align : 'right'
	                },
	                {
	                    field: 'qmye2',
	                    title: '期末数',
	                    align : 'right'
	                }]]
            };
            $.table.init(options);
        });
        
    </script>
</body>
</html>